#include <iostream>
#include <cstdlib>
#include <ctime>
#include "../print/print.h"
#include "../select/select.h"
#include "../compare/compare.h"
#include "../p_r_s.h"

using namespace std;

int main(void) {
    cout << "Welcome to the game of Paper, Rock, Scissors, Water, Fire!\n\n";
    cout << "You can choose from the following options:\n";
    cout << "This is master branch.\n";
    outcome result;
    p_r_s player, machine;
    srand(time(NULL));

    prn_help();
    while ((player = selection_by_player()) != quit) {
        switch (player) 
        {
        case paper:
        case rock:
        case scissor:
        case water:
        case fire:
            machine = selection_by_machine();
            result = compare(player, machine);
            report(result); break; 
        case game:
            prn_game_status(); break;
        case help:
            prn_help(); break;
        default:
            cout << "PROGRAMMER ERROR!\n\n";
            exit(1);
        }
    }

    prn_game_status();

    return 0;
}